/*
Copyright (C) 2001, 2010 United States Government
as represented by the Administrator of the
National Aeronautics and Space Administration.
All Rights Reserved.
*/

package gov.nasa.worldwind.util.xml;

import gov.nasa.worldwind.util.Logging;

import javax.xml.stream.XMLStreamException;
import javax.xml.stream.events.XMLEvent;

/**
 * @author tag
 * @version $Id: AbstractXMLEventParser.java 13107 2010-02-06 08:25:24Z tgaskins $
 */
public abstract class AbstractXMLEventParser implements XMLEventParser
{
    public Object parse(XMLEventParserContext ctx, XMLEvent event, Object... args) throws XMLStreamException
    {
        if (ctx == null)
        {
            String message = Logging.getMessage("nullValue.ParserContextIsNull");
            Logging.logger().severe(message);
            throw new IllegalArgumentException(message);
        }

        if (event == null)
        {
            String message = Logging.getMessage("nullValue.EventIsNull");
            Logging.logger().severe(message);
            throw new IllegalArgumentException(message);
        }

        return null;
    }
//
//    @SuppressWarnings({"UnusedDeclaration"})
//    protected void validateArgs(XMLEventParserContext context, XMLEvent event, Object... args)
//        throws IllegalArgumentException
//    {
//        if (context == null)
//        {
//            String message = Logging.getMessage("nullValue.ParserContextIsNull");
//            Logging.logger().severe(message);
//            throw new IllegalArgumentException(message);
//        }
//
//        if (event == null)
//        {
//            String message = Logging.getMessage("nullValue.EventIsNull");
//            Logging.logger().severe(message);
//            throw new IllegalArgumentException(message);
//        }
//    }
}
